FUNCTION

json.get_or_null

pure function get_or_null(index: integer): json?

Get the element at the specified index of this JSON array, or null if this JSON value is not an array, or if the specified index is out of bounds.

Parameters

  • index — the array index

Since

0.14.16


pure function get_or_null(key: text): json?

Get the member with the specified key in this JSON object, or null if this JSON value is not an object, or if the specified key is not found in this object.

Parameters

  • key — the object key

Since

0.14.16

© 2026 Chromia